<template>
	<view class="u-page">
		<u-button type="primary" text="ios & android 添加日程" @click="addSchedule"></u-button>
		<u-button type="primary" text="获取 android 日程" customStyle="margin-top: 10px" @click="listSchedule"></u-button>

		<u-button type="primary" text="添加 android 日程" customStyle="margin-top: 10px" @click="addASchedule"></u-button>

		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		methods: {
			addSchedule() {
				// #ifdef APP-PLUS
				uni.navigateTo({
					url: "./add"
				})
				// #endif

				// #ifdef H5
				this.$refs.uToast.show({
					type: 'error',
					message: "h5不能添加日程",
				})
				// #endif
			},
			listSchedule() {
				uni.navigateTo({
					url: "./list"
				})
			},
			addASchedule() {
				uni.navigateTo({
					url: "./addA"
				})
			}
		},
	}
</script>
<style lang="scss">
	.u-page {
		padding: 30rpx;
	}
</style>
